import request from '@/utils/request'

// 查询商品类目表列表
export function listBCategory (query) {
  return request({
    url: '/category/bCategory/list',
    method: 'get',
    params: query
  })
}

// 查询商品类目表详细
export function getBCategory (id) {
  return request({
    url: '/category/bCategory/' + id,
    method: 'get'
  })
}

// 新增商品类目表
export function addBCategory (data) {
  return request({
    url: '/category/bCategory',
    method: 'post',
    data: data
  })
}

// 修改商品类目表
export function updateBCategory (data) {
  return request({
    url: '/category/bCategory',
    method: 'put',
    data: data
  })
}

// 删除商品类目表
export function delBCategory (id) {
  return request({
    url: '/category/bCategory/' + id,
    method: 'delete'
  })
}


// 导出商品类目表
export function exportBCategory (query) {
  return request({
    url: '/category/bCategory/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/category/bCategory/getInitData/' + dictTypes,
    method: 'get'
  })
}
